#ifndef __OBJECTCREATESTRATEGY_H__
#define __OBJECTCREATESTRATEGY_H__

#include <vector>
#include <random>



class TimingStrategy
{
private:
public:
	static std::vector<int> getTiming(int n, int time_interval)
	{
		std::vector<int> result(n);
		std::default_random_engine generator;
		std::uniform_int_distribution<int> distribution(0, time_interval);

		for(int i = 0 ; i < n ; i++)
		{
			result[i] = distribution(generator);
			distribution.reset();
		}
		return result;
	}
};
class PositionStrategy
{
private:
public:
	static std::vector<std::vector<float>> get_xyz(int n, float x_min, float x_max, float y_min, float y_max, float z_min, float z_max)
	{
		std::vector<std::vector<float>> result(n);
		std::vector<float> subresult(3);

		//std::default_random_engine generator;
		//std::uniform_real_distribution<float> distribution_x(x_min, x_max);
		//std::uniform_real_distribution<float> distribution_y(y_min, y_max);
		//std::uniform_real_distribution<float> distribution_z(z_min, z_max);

		for(int i = 0 ; i < n ; i++)
		{
			//subresult[0] = distribution_x(generator);
			//printf("%f\n", subresult[0]);
			//subresult[1] = distribution_y(generator);
			//subresult[2] = distribution_z(generator);
			if(x_max - x_min == 0)
				subresult[0] = x_min;
			else
				subresult[0] = (std::rand() % (int)(x_max - x_min)) + x_min;
			if(y_max - y_min == 0)
				subresult[1] = y_min;
			else
				subresult[1] = (std::rand() % (int)(y_max - y_min)) + y_min;
			if(z_max - z_min == 0)
				subresult[2] = z_min;
			else
				subresult[2] = (std::rand() % (int)(z_max - z_min)) + z_min;

			result[i] = subresult;

			//distribution_x.reset();
			//distribution_y.reset();
			//distribution_z.reset();
		}

		return result;
	}
};
class NumberStrategy
{
private:
public:
	static int get_number(int min, int max)
	{
		std::default_random_engine generator;
		std::uniform_int_distribution<int> distribution(min, max);
		distribution.reset();
		return distribution(generator);
	}
};

#endif